package com.ytjj.qmyx.admin.client;

import com.ytjj.common.api.CommonResult;
import com.ytjj.qmyx.admin.model.YxOrderExceptionNote;
import com.ytjj.qmyx.admin.model.request.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient("qmyx-banker")
public interface BankerClient {
    /**
     * 审核供应商主体信息
     * @param request
     * @return
     */
    @PostMapping("/brand/checkBanker")
    CommonResult checkBanker(@RequestBody BankerCheckStatusRequest request);

    /**
     * 审核供应商店铺信息
     * @param request
     * @return
     */
    @PostMapping("/brand/checkBankerSite")
    CommonResult checkBankerSite(@RequestBody BankerCheckStatusRequest request);

    /**
     * 审核供应商品牌信息
     * @param request
     * @return
     */
    @PostMapping("/brand/checkBankerBrand")
    CommonResult checkBankerBrand(@RequestBody BankerCheckStatusRequest request);

    /**
     * 释放主体信息
     * @param request
     * @return
     */
    @PostMapping("/brand/release_info")
    CommonResult releaseInfo(@RequestBody BankerUpdateReleaseRequest request);

    /**
     * 释放店铺
     * @param request
     * @return
     */
    @PostMapping("/brand/release_site")
    CommonResult releaseSite(@RequestBody BankerUpdateReleaseRequest request);

    /**
     * 释放品牌
     * @param request
     * @return
     */
    @PostMapping("/brand/release_brand")
    CommonResult releaseBrand(@RequestBody BankerUpdateReleaseRequest request);

    /**
     * 品牌上架/下架
     * @param request
     * @return
     */
    @PostMapping("/brand/brandPutOn")
    CommonResult putOnBrand(@RequestBody BankerUpdatePutOnRequest request);

    /**
     * 修改供应商品牌名称
     * @param request
     * @return
     */
    @PostMapping("/brand/updateBrandName")
    CommonResult updateBrandName(@RequestBody BrandUpdateNameRequest request);

    /**
     * 下架供应商店铺信息
     * @param request
     * @return
     */
    @PostMapping("/brand/bankerSitePutOn")
    CommonResult bankerSitePutOn(@RequestBody BankerUpdatePutOnRequest request);

    /**
     * 商品编辑同步修改供应商商品规格（成本价，库存）
     * @param updateSkuRequest
     * @return
     */
    @PostMapping("/product/updateProductSpec")
    CommonResult updateProductSpec(@RequestBody UpdateSkuRequest updateSkuRequest);

    /**
     * 重置供应商密码
     * @param request
     * @return
     */
    @PostMapping("/bankerInfo/resetPwd")
    CommonResult resetPwd(@RequestBody BrandUpdateNameRequest request);

    //获取省份
    @GetMapping("/BankerReturn/getProvince")
    CommonResult getProvince(@RequestParam(value="id",required=false) Integer id);

    //根据省份id
    @GetMapping("/BankerReturn/getCity")
    CommonResult getCity(@RequestParam(value="id",required=false) Integer id);

    //根据城市id
    @GetMapping("/BankerReturn/getArea")
    CommonResult getArea(@RequestParam(value="id",required=false) Integer id);

    /**
     * 供应商异常订单跟踪页--查询
     * @param exceptionOrdersRequest
     * @return
     */
    @PostMapping("/order/getExceptionOrders")
    CommonResult getExceptionOrders(@RequestBody ExceptionOrdersRequest exceptionOrdersRequest);

    /**
     * 供应商异常订单跟踪页--导出异常订单
     * @param exceptionOrdersRequest
     * @return
     */
    @PostMapping("/order/batchExportExceptionOrders")
     CommonResult batchExportExceptionOrders(@RequestBody ExceptionOrdersRequest exceptionOrdersRequest);

    /**
     * 供应商异常订单跟踪页--备注列表
     * @param id
     * @return
     */
    @GetMapping("/banker/selectNote")
    CommonResult selectNote (@RequestParam Integer id);

//    /**
//     * 供应商异常订单跟踪页--更新异常订单处理状态
//     * @param exceptionOrdersRequest
//     * @return
//     */
//    @PostMapping("/order/updateExceptionHandleStatus")
//    CommonResult updateExceptionHandleStatus(@RequestBody ExceptionOrdersRequest exceptionOrdersRequest);
}
